package com.neusoft.nepm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.common.domain.City;
import com.neusoft.common.domain.Province;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CityMapper extends BaseMapper<City> {

    @Select("select * from city where province_id = #{id}")
    List<City> query(int id);
    @Select("select * from city")
    List<City> listAll();
    @Select("select * from city where province_id = #{id} and id != #{cid}")
    List<City> queryNot(@Param("id") int id,@Param("cid") int cid);
    @Select("select * from province where id = #{id}")
    Province find(int id);
    @Select("select * from city where id = #{id}")
    City findCity(int id);
    @Select(("select * from province"))
    List<Province> provinceList();
    @Select("select * from province where id!=#{id}")
    List<Province> findProvinceEx(int id);
}
